/**
 * Created by cuppi on 2017/6/8.
 */

import {ACCOUNT} from '../mutations-types';

const defaultAccount = null;
// const defaultAccount = {custId: 'Co1z7hV167Faqkk5WIohVdhaHj+mORib'};
const AccountModule = {
  state: {
    account: defaultAccount
  },
  mutations: {
    [ACCOUNT.UPDATE_ACCOUNT](state, account = defaultAccount){
      if (!account) {
        state.account = defaultAccount;
        return;
      }
      state.account = {
        ...account
      }
    }
  }
}

export default AccountModule;
